package com.qf.book;

import com.qf.book.impl.BookImpl;

public class Demo01 {
    public static void main(String[] args) {
        BookImpl bookImpl = new BookImpl();
        //String bookId, String bookName, String author,String publisher, int pageNumber
        Book book1 = new Book("9527","神墓","辰西","天庭",6000);
        Book book2 = new Book("9527","神墓","辰东","天庭",60000);
        Book book3 = new Book("9528","斗罗大陆","唐家三少","天庭",50000);
        Book book4 = new Book("9529","斗破苍穹","爱吃西红柿","天庭",40000);
        Book book5 = new Book("9530","会到明朝当王爷","月关","天庭",300000);
        Book book6 = new Book("9531","坏蛋是怎样炼成的","六道","天庭",20000);

        bookImpl.addBook(book1);
        bookImpl.addBook(book2);
        bookImpl.addBook(book3);
        bookImpl.addBook(book4);
        bookImpl.addBook(book5);
        bookImpl.addBook(book6);

        bookImpl.selectAll();
        book1.setAuthor("辰东");
        bookImpl.selectAll();
        bookImpl.updateBook(book1);
        book1.setPageNumber(100000);
        bookImpl.deleteBook(book1.getBookId());
        bookImpl.selectOne(book1.getBookId());
        bookImpl.selectAll();



    }
}
